package likes

import (
	"github.com/gin-gonic/gin"
	"vrcm/src/vrcm/app/admin/router"

	"vrcm/src/vrcm/app/admin/apis/likes"
)

func init() {
	router.NoCheckRole = append(router.NoCheckRole, registerLikesRouter)
}

// registerLikesRouter
func registerLikesRouter(v1 *gin.RouterGroup) {
	api := apis.Likes{}
	r := v1.Group("/likes")
	{
		r.GET("", api.GetPage)
		r.GET("/:id", api.Get)
		r.POST("", api.Insert)
		r.PUT("/:id", api.Update)
		r.DELETE("", api.Delete)
		r.POST("/add-likes-num", api.AddLikesNum)
		r.POST("/b", api.SyncLikesNum)
		r.POST("/get-likes-num", api.GetLikesNum)
	}
}
